<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	template="templateMain.xhtml">

	<ui:define name="head">
		<style type="text/css">
			.label {
				width: 80%;
				padding:2px;                                
			}
			.name {
				width:150px;
				padding:2px;
			}
			.surname {
				width:150px;
				padding:2px;
			}
			.email {
				width:230px;
				padding:2px;
			}
			.password {
				width:150px;
				padding:2px;
			}
			.grid {
				width:100%;
			}
			.panel {
				width:45%;
			}
			.combo {
				width:110px;
			}
		</style>
	</ui:define>

  <ui:define name="content">
        <h:form prependId="false">
                <p:panel id="panelUser" header="Moto" styleClass="panel">
                        <p:growl showDetail="true"/>

                        <h:panelGrid columns="2" styleClass="grid">

                                <h:outputLabel for="type" value="Marca" styleClass="label" />
                                <h:selectOneMenu  id="type"  value="#{createUserBike.selectType}" immediate="true" validatorMessage="Escolha uma Marca" required="true" styleClass="combo">
                                    <f:selectItems value="#{createUserBike.typeOptions}" />
                                </h:selectOneMenu>

                                <h:outputLabel for="model" value="Modelo" styleClass="label" />
                                <h:selectOneMenu  id="model" value="#{createUserBike.selectType}" immediate="true" validatorMessage="Escolha um Modelo" required="true" styleClass="combo">
                                    <f:selectItems value="#{createUserBike.modelOptions}" />
                                </h:selectOneMenu>

                        </h:panelGrid>

                        <h:panelGroup>
                                <h:panelGrid columns="2">
                                        <p:commandButton value="Adicionar" actionListener="#{createUserBike.save}" async="true" update="panelUser" />
                                </h:panelGrid>
                        </h:panelGroup>
                </p:panel>
        </h:form>
  </ui:define>

</ui:composition>